import os

os.system("python ..\pyinstaller\Configure.py")
os.system('python ..\pyinstaller\Makespec.py -F -c --icon=ounk\Ounk.ico "Ounk.py"')
os.system('python ..\pyinstaller\Build.py "Ounk.spec"')
print 'svn export project'
os.system("svn export . Ounk_Win")
print 'copying Ounk.exe from dist to Ounk_Win'
os.system("copy dist\Ounk.exe Ounk_Win /Y")
print 'copying README file'
os.system("copy scripts\README.txt Ounk_Win /Y")
#os.remove("Ounk.exe")
print 'removed script folder from distribution'
os.system("rmdir /Q /S Ounk_Win\scripts")
print 'removed Ounk.py from distribution'
os.remove("Ounk_Win/Ounk.py")
os.remove("Ounk_Win/setup.py")
print 'removed Ounk.icns from distribution'
os.remove("Ounk_Win/ounk/Ounk.icns")
print 'removed Ounk.spec file'
os.remove("Ounk.spec")
print 'removed Warning file'
os.remove("warnOunk.txt")
print 'removed build and dist folder'
os.system("rmdir /Q /S build")
os.system("rmdir /Q /S dist")
#print '----- compress ------'
#os.system("PAComp -r -p Ounk_Win.zip Ounk_Win\*")
#print 'removed Ounk_Win folder'
#os.system("rmdir /Q /S Ounk_Win")
